home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 1
/
Merciful - Disc 1.iso
/
software
/
b
/
black_belt
/
blackbelt.dms
/
blackbelt.adf
/
Game.AMOS
/
Game.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1990-08-11
|
5KB
|
182 lines
Rem ***Black Belt v1.0***
Rem **By Simon Walklate**
Rem Variable A is the power
Rem Variable D is the difficulty (the higher the easyer)
Rem Variable p is a counter so the computer knows when it should -1 from A
Rem Varibles X and Z Stops the player from pushing the same way twice
Rem Variable B is the damage to the wooden block
Rem Variable T is the time limit
Rem Variable S is score
Rem variable r is the hits the block takes
Rem Varible J$ is Easy, Hard or Medium
Rem Variable q is a counter for when to change title screen
Rem Variable w is to tell which title screen is being displayed
Rem Variable h tells the computer which difficulty level has been selected
Rem Variable q$ is EASY,MEDI, or HARD
Rem variable k tells the computer whether or not screen 1 is switched on
Rem Variable V tells the computer not to give you ran out of time after the bonus
Close Workbench
Close Editor
Screen Open 0,320,200,16,Lowres
Rem Set variables, load screens and samples etc.
BEG:
P=0
Global P
V=0
Global V
K=0
Global K
W=0
Global W
Q=0
Global Q
T=0
Global T
S=0
Global S
Curs Off
Rem show title screen and alternate between the two
If K=1 Then Cls : Screen Close 1
Hide On
Load "music.abk"
Music 1
Load "sprites.abk"
Load Iff "title.pic",0
Do
If W=0 and Q=200 Then Load Iff "title2.pic",0 : W=1 : Q=0
If W=1 and Q=200 Then Load Iff "title.pic",0 : W=0 : Q=0
Q=Q+1
If Fire(1) Then Music Off : Cls : Paper 0 : Pen 4 : Get Sprite Palette : Goto DIFF
Rem Flash to the music routine
A=Vumeter(0)
B=Vumeter(1)
C=Vumeter(2)
D=Vumeter(3)
If A>32 Then Led On : Wait 1
If A<32 Then Led Off : Wait 1
If B>32 Then Led On : Wait 1
If B<32 Then Led Off : Wait 1
If C>32 Then Led On : Wait 1
If C<32 Then Led Off : Wait 1
If D>32 Then Led On : Wait 1
If D<32 Then Led Off : Wait 1
Loop
DIFF:
Led Off
Cls
Double Buffer
Bob 1,150,100,1
Channel 1 To Bob 1
H=0
Screen Open 1,520,25,2,Hires : K=1
Rem Select Difficulty level
Do
Screen 0
If H>2 Then H=2
If H<0 Then H=0
If H=0 Then Q$="EASY"
If H=1 Then Q$="MEDI"
If H=2 Then Q$="HARD"
If Fire(1) and H=0 Then Goto BACKGROUND
If Fire(1) and H=1 Then Goto BACKGROUND
If Fire(1) and H=2 Then Goto BACKGROUND
If Jleft(1) and H>0 Then Amal On 1 : Sam Play 2 : Wait 74 : H=H-1
If Jright(1) and H<2 Then Amal On 1 : Sam Play 2 : Wait 74 : H=H+1
Global H
Screen 1
Curs Off
Locate 0,0 : Centre "Choose difficulty level"
Locate 0,1 : Centre Q$
Amal 1,"Anim 1,(1,4)(2,4)(3,4)(4,4)(5,4)(6,4)(7,4)(8,4)(9,10)(8,4)(7,4)(6,4)(5,4)(4,4)(3,4)(2,4)(1,4)"
Loop
BACKGROUND:
Cls
Load "samples.abk"
Load Iff "background",0
Double Buffer
STAR:
Screen Open 1,520,17,2,Hires : K=1
Screen 1 : Curs Off : Hide On : Screen 0
Paper 0
Pen 1
Screen 0
Paper 0
Pen 4
If H=0 Then T=500
If H=1 Then T=400
If H=2 Then T=300
Global T
B=0
Global B
If H=0 Then D=5
If H=1 Then D=3
If H=2 Then D=2
Global D
A=0
Global A
L=0
Global L
X=1
Global X
Z=1
Global Z
If H=0 Then R=50
If H=1 Then R=70
If H=2 Then R=100
Screen 0
Channel 0 To Bob 1 : Channel 1 To Bob 1 : Channel 2 To Bob 1
Rem MAIN LOOP
Do
L=L+1
T=T-1
Rem Update screen 1
Screen 1
Cls
Locate 8,0 : Print "Score:";S
Locate 23,0 : Print "Power:";A : Locate 38,0 : Print "Time:";T : Locate 53,0 : Print "Damage:";B
Screen 0
Bob 1,150,100,1
Amal 0,"Anim 1,(1,4)(2,4)(3,4)(4,4)(5,4)(4,4)(3,4)(2,4)(1,4)"
Amal 1,"Anim 1,(1,4)(2,4)(3,4)(4,4)(5,4)(6,4)(7,4)(8,4)(9,10)"
Amal 2,"Anim 1,(1,4)(2,4)(3,4)(2,4)(1,4)"
If A>100 Then A=100
If A<0 Then A=0
If L=D Then L=0 : A=A-1
If T=0 Then Screen 1 : Cls : Locate 0,0 : Centre "!!!!Time Up!!!!" : Screen 0 : Wait 10 : Proc TRYAGAIN
Rem Check joystick
If Jleft(1) Then A=A+Z : X=1 : Z=0
If Jright(1) Then A=A+X : Z=1 : X=0
If B=R or B>R Then Screen 0 : Amal On 1 : Sam Play 2 : Wait 100 : Proc BONUS
If Fire(1) and A<10 or Fire(1) and A=10 Then Screen 0 : Amal On 2 : Wait 10
If Fire(1) and A=100 or Fire(1) and A>100 Then B=B+20 : S=S+150 : A=A-100
If Fire(1) and A>90 Then B=B+15 : A=A-90 : S=S+130 : Screen 0 : Amal On 0 : Sam Play 2 : Wait 30
If Fire(1) and A>80 Then B=B+15 : A=A-80 : S=S+115 : Screen 0 : Amal On 0 : Sam Play 2 : Wait 30
If Fire(1) and A>70 Then B=B+15 : A=A-70 : S=S+100 : Screen 0 : Amal On 0 : Sam Play 2 : Wait 30
If Fire(1) and A>60 Then B=B+10 : A=A-60 : S=S+85 : Screen 0 : Amal On 0 : Sam Play 2 : Wait 30
If Fire(1) and A>50 Then B=B+10 : A=A-50 : S=S+70 : Screen 0 : Amal On 0 : Sam Play 2 : Wait 30
If Fire(1) and A>40 Then B=B+10 : A=A-40 : S=S+55 : Screen 0 : Amal On 0 : Sam Play 2 : Wait 30
If Fire(1) and A>30 Then B=B+5 : A=A-30 : S=S+40 : Screen 0 : Amal On 0 : Sam Play 2 : Wait 30
If Fire(1) and A>20 Then B=B+5 : A=A-20 : S=S+25 : Screen 0 : Amal On 0 : Sam Play 2 : Wait 30
If Fire(1) and A>10 Then B=B+5 : A=A-10 : S=S+10 : Screen 0 : Amal On 0 : Sam Play 2 : Wait 30
Loop
Rem Display either winning or loosing screen
Procedure TRYAGAIN
Curs Off
If V=1 Then Load Iff "winner",0 : Screen Open 1,640,25,2,Hires : Screen 1 : K=1 : Curs Off : Locate 0,0 : Centre "!!! You did it !!!"
If V=0 Then Load Iff "looser",0 : Screen Open 1,640,25,2,Hires : K=1 : Screen 1 : Curs Off : Locate 0,0 : Centre "!! You ran out of time !!"
Screen 1 : Locate 30,1 : Print "Your score was";S
Do
If Fire(1) Then Goto BEG
Loop
End Proc
Rem Reduce time and add to score
Procedure BONUS
Do
Screen 1
Cls
Locate 8,0 : Print "Score:";S
Locate 23,0 : Print "Power:";A : Locate 38,0 : Print "Time:";T : Locate 53,0 : Print "Damage:";B
If T=0 Then V=1 : Proc TRYAGAIN
If T>0 Then T=T-1 : S=S+1
Loop
End Proc